<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>撞破南墙找西墙</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/static/s.css">
    <link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}" type="image/x-icon">
</head>
<body>

{% include '_nav_index.html' %}

<div class="container">
    <div class="row">
        <div class="col-md-6">
            <div id="carouselExampleIndicators" class="carousel slide" data-bs-ride="carousel">
                <ol class="carousel-indicators">
                    <li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="0" class="active"></li>
                    {% for i in banners_list_number %}
                    <li data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{ i }}"></li>
                    {% endfor %}
                </ol>
                <div class="carousel-inner carousel-radius" style="box-shadow: 5px 5px 5px gray;">
                    <div class="carousel-item active">
                        <img src="/uploads/{{ first_banner['img'] }}" alt="Banner Image">
                    </div>
                    {% for i in banner_list %}
                    <div class="carousel-item">
                        <img src="/uploads/{{ i['img'] }}" alt="Banner Image">
                    </div>
                    {% endfor %}
                </div>
                <a class="carousel-control-prev" href="#carouselExampleIndicators" role="button" data-bs-slide="prev">
                    <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                    <span class="visually-hidden">Previous</span>
                </a>
                <a class="carousel-control-next" href="#carouselExampleIndicators" role="button" data-bs-slide="next">
                    <span class="carousel-control-next-icon" aria-hidden="true"></span>
                    <span class="visually-hidden">Next</span>
                </a>
            </div>
        </div>

        <!-- 右侧新闻列表 -->
        <div class="col-md-6 news-list">
            <div class="post">
                <div class="card" style="box-shadow: 5px 5px 10px gray;">
                    <div class="card-header">
                        <div class="d-flex align-items-center">
                            {% if news['type'] == 'anonymous' %}
                            <img src="/static/userheader.svg" width="60px" alt="User Avatar"
                                 class="avatar me-3 rounded-circle">
                            <div>
                                <h5 class="mb-0">匿名用户</h5>
                                <p class="text-muted mb-0">{{ news['time'] }}</p>
                            </div>
                            {% else %}
                            <img src="{{ news['head'] }}" width="60px" alt="User Avatar"
                                 class="avatar me-3 rounded-circle">
                            <div>
                                <h5 class="mb-0">{{ news['name'] }}</h5>
                                <p class="text-muted mb-0">{{ news['time'] }}</p>
                            </div>
                            {% endif %}
                        </div>
                    </div>
                    <div class="card-body">
                        <p class="post-content">{{ news['content']|safe }}</p>
                        {% if news['img'] %}
                        <a href="/uploads/{{ news['img'] }}" target="_blank"><img src="/uploads/{{ news['img'] }}"
                                                                                  width="200px" height="150px"
                                                                                  class="img-fluid mt-3"></a>
                        {% endif %}
                        <br><br><a href="/news">
                        <button class="btn btn-ff9933">前往学校学生新闻板块</button>
                    </a>
                    </div>
                </div>
            </div>

            <!--            <div class="card card-blue">-->
            <!--                <div class="card-body">-->
            <!--                    <div class="d-flex justify-content-between align-items-center">-->
            <!--                        <div>-->
            <!--                            <img src="{{ news['head'] }}" class="rounded-circle" style="margin: 5px;" width="60">-->
            <!--                            <font size="5px">{{ news['name'] }}-->
            <!--                                {% if news['is_official'] %}&nbsp;<span class="badge bg-warning">官方</span>{% endif %}-->
            <!--                                {% if news['is_vip'] %}&nbsp;<span class="badge bg-danger">VIP</span>{% endif %}-->
            <!--                            </font>-->
            <!--                        </div>-->
            <!--                        <div>-->
            <!--                            <small class="text-muted">{{ news['time'] }}</small>-->
            <!--                        </div>-->
            <!--                    </div>-->
            <!--                    <hr>-->
            <!--                    <p>{{ news['content']|safe }}</p>-->
            <!--                    {% if news['img'] %}-->
            <!--                    <a href="/uploads/{{ news['img'] }}" target="_blank"><img src="/uploads/{{ news['img'] }}"-->
            <!--                                                                              width="150px" height="150px"-->
            <!--                                                                              class="img-fluid mt-3"></a>-->
            <!--                    {% endif %}-->
            <!--                </div>-->
            <!--                <a href="/news">-->
            <!--                    <button type="button" class="btn btn-blue">-->
            <!--                        前往新闻板块-->
            <!--                    </button>-->
            <!--                </a>-->
            <!--            </div>-->
        </div>
    </div>

    <!-- 下半部分信息列表 -->
    <div class="row info-list">
        <div class="col-md-12">
            {% for i in wall_list %}
            <div class="post">
                <div class="card" style="box-shadow: 5px 5px 10px gray;">
                    <div class="card-header">
                        <div class="d-flex align-items-center">
                            {% if i['type'] == 'anonymous' %}
                            <img src="/static/userheader.svg" width="60px" alt="User Avatar"
                                 class="avatar me-3 rounded-circle">
                            <div>
                                <h5 class="mb-0">匿名用户</h5>
                                <p class="text-muted mb-0">{{ i['time'] }}</p>
                            </div>
                            {% else %}
                            <img src="{{ i['head'] }}" width="60px" alt="User Avatar"
                                 class="avatar me-3 rounded-circle">
                            <div>
                                <h5 class="mb-0">{{ i['name'] }}
                                    {% if i['is_official'] %}&nbsp;<span class="badge bg-official">官方</span>{% endif %}
                                    {% if i['is_vip'] %}&nbsp;<span class="badge bg-vip">VIP</span>{% endif %}
                                </h5>
                                <p class="text-muted mb-0">{{ i['time'] }}</p>
                            </div>
                            {% endif %}
                        </div>
                    </div>
                    <div class="card-body">
                        <p class="post-content">{{ i['content']|safe }}</p>
                        {% if i['img'] %}
                        <a href="/uploads/{{ i['img'] }}" target="_blank"><img src="/uploads/{{ i['img'] }}"
                                                                               width="200px" height="150px"
                                                                               class="img-fluid mt-3"></a>
                        {% endif %}
                        <br><br><a href="/wall">
                        <button class="btn btn-ff9933">前往表白墙</button>
                    </a>
                    </div>
                </div>
            </div>

            <!--            <div class="card card-pink">-->
            <!--                <div class="card-body">-->
            <!--                    <div class="d-flex justify-content-between align-items-center">-->
            <!--                        <div>-->
            <!--                            {% if i['type'] == 'anonymous' %}-->
            <!--                            <img src="/static/userheader.svg" class="rounded-circle" style="margin: 5px;" width="60">-->
            <!--                            <font size="5px">匿名用户</font>-->
            <!--                            {% else %}-->
            <!--                            <img src="{{ i['head'] }}" class="rounded-circle" style="margin: 5px;" width="60">-->
            <!--                            <font size="5px">{{ i['name'] }}-->
            <!--                                {% if i['is_official'] %}&nbsp;<span class="badge bg-warning">官方</span>{% endif %}-->
            <!--                                {% if i['is_vip'] %}&nbsp;<span class="badge bg-danger">VIP</span>{% endif %}-->
            <!--                            </font>-->
            <!--                            {% endif %}-->
            <!--                        </div>-->
            <!--                        <div>-->
            <!--                            <small class="text-muted">{{ i['time'] }}</small>-->
            <!--                        </div>-->
            <!--                    </div>-->
            <!--                    <hr>-->
            <!--                    <p>{{ i['content']|safe }}</p>-->
            <!--                    {% if i['img'] %}-->
            <!--                    <a href="/uploads/{{ i['img'] }}" target="_blank"><img src="/uploads/{{ i['img'] }}"-->
            <!--                                                                           width="150px" height="150px"-->
            <!--                                                                           class="img-fluid mt-3"></a>-->
            <!--                    {% endif %}-->
            <!--                </div>-->
            <!--                <a href="/wall">-->
            <!--                    <button type="button" class="btn btn-deep">-->
            <!--                        前往表白墙板块-->
            <!--                    </button>-->
            <!--                </a>-->
            <!--            </div>-->
            {% endfor %}
        </div>
    </div>
</div>
<br><br>

{% include '_footer.html' %}

<script src="https://cdn.staticfile.org/twitter-bootstrap/5.1.1/js/bootstrap.bundle.min.js"></script>
</body>
</html>
